home *** CD-ROM | disk | FTP | other *** search
- on RunFromCD theFileName
- set drive to char 1 of the pathName
- set thispath to string(drive & ":\" & theFileName)
- set myFile to FileIO(mnew, "READ", thispath)
- if objectp(myFile) then
- myFile(mdispose)
- put "From the CD with the path " & drive
- return drive & ":"
- exit
- else
- InitFileIO()
- set drive to CdReadFile()
- CloseFileIO()
- put "From the Hard drive with the path " & drive
- return drive & ":"
- exit
- end if
- alert("Please check that" && QUOTE & theFileName & QUOTE && "is on your CD drive.")
- end
-
- on InitFileIO
- global gReadBuffer
- set gReadBuffer to FileIO(mnew, "read", the pathName & "word.cfg")
- if objectp(gReadBuffer) <> 1 then
- put "Can't find anything!"
- alert("Cannot find CD or installation directory. Please re-install")
- quit()
- end if
- end
-
- on CdReadFile
- global gReadBuffer
- set theText to gReadBuffer(mReadLine)
- set theText to gReadBuffer(mReadLine)
- return char 2 of theText
- end
-
- on CloseFileIO
- global gReadBuffer
- gReadBuffer(mdispose)
- end
-
- on stopMovie
- if objectp(gReadBuffer) then
- gReadBuffer(mdispose)
- end if
- end
-